package com.back;

import com.frame.struts.BaseBean;
import java.util.Date;
import javax.servlet.http.HttpServletRequest;
import com.utils.CommUtil;
import javax.servlet.http.HttpServletResponse;
import com.frame.struts.ActionContext;

/**
 * <p>
 * Title:
 * </p>
 * <p>
 * Description:
 * </p>
 * <p>
 * Copyright: Copyright (c) 2006
 * </p>
 * <p>
 * Company:
 * </p>
 * 
 * @author not attributable
 * @version 1.0
 */

public class OprtInfoForm extends BaseBean
{
    OprtInfoEntity oie = new OprtInfoEntity();

    public OprtInfoForm()
    {
    }

    private String oldId = "";

    public String addOprtInfo()
    {
        HttpServletRequest request = ActionContext.getActionContext()
                                                  .getRequest();
        HttpServletResponse response = ActionContext.getActionContext()
                                                    .getResponse();
        BackFactory factory = new BackFactory();
        try
        {
            if( factory.addOprtInfo( oie ) )
            {
                response.sendRedirect( "/back/queryOprtInfo.jsp?keyword="
                        + oie.getOprtid() );
            }
        }
        catch( Exception e )
        {
            e.printStackTrace();
        }

        return null;
    }

    public String modifyOprtInfo()
    {
        HttpServletRequest request = ActionContext.getActionContext()
                                                  .getRequest();
        HttpServletResponse response = ActionContext.getActionContext()
                                                    .getResponse();
        BackFactory factory = new BackFactory();
        try
        {
            factory.deleteOprtInfo( this.getOldId() );
            if( factory.addOprtInfo( oie ) )
            {
                response.sendRedirect( "/back/queryOprtInfo.jsp" );
            }
        }
        catch( Exception e )
        {
            e.printStackTrace();
        }

        return null;
    }

    public String getOldId()
    {
        return this.oldId;
    }

    public void setOldId( String oldId )
    {
        this.oldId = oldId;
    }

    public String getYhmm()
    {
        return oie.getYhmm();
    }

    public void setYhmm( String yhmm )
    {
        oie.setYhmm( yhmm );
    }

    public String getQymc()
    {
        return oie.getQymc();
    }

    public void setQymc( String qymc )
    {
        oie.setQymc( qymc );
    }

    public int getJsid()
    {
        return oie.getJsid();
    }

    public void setJsid( int jsid )
    {
        oie.setJsid( jsid );
    }

    public String getLxdh()
    {
        return oie.getLxdh();
    }

    public void setLxdh( String lxdh )
    {
        oie.setLxdh( lxdh );
    }

    public String getOprtid()
    {
        return oie.getOprtid();
    }

    public void setOprtid( String oprtid )
    {
        oie.setOprtid( oprtid );
    }

    public String getQyid()
    {
        return oie.getQyid();
    }

    public void setQyid( String qyid )
    {
        oie.setQyid( qyid );
    }

    public int getYxrq()
    {
        return oie.getYxrq();
    }

    public void setYxrq( int yxrq )
    {
        oie.setYxrq( yxrq );
    }

}